<?php require_once 'ext/php/lib.php';?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml" xmlns:b="http://www.google.com/2005/gml/b" xmlns:data="http://www.google.com/2005/gml/data" xmlns:expr="http://www.google.com/2005/gml/expr"><head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<meta name="description" content=""/>
<meta name="keywords" content="<?php echo Page::fetch_page_content_by_name('keywords') ?>"/>

<title><?php echo Page::fetch_page_title_in_constant($page);?> - <?php echo Page::fetch_page_content_by_name('title');?></title>

<link href="ext/imgs/favicon.png" rel="icon" type="image/x-icon" />
<link type="text/css" rel="stylesheet" href='ext/css/base.css' />
<link type="text/css" rel="stylesheet" href="ext/css/index.css" />
<link type="text/css" rel="stylesheet" href="ext/css/cse.css"  />

<script type="text/javascript" src='ext/js/jquery/jquery.min.js'></script>
<script>
$(function(){
	$('#s').focus(function(){
		if($(this).val()=='[Tìm kiếm]')
			$(this).val('');
	})
	$('#s').blur(function(){
		if($(this).val()=='')
			$(this).val('[Tìm kiếm]');
	});	
	<?php if($login==1 && $mode=='edit'){?>
	$('.i-update,.i-delete').each(function(index) {
		$(this).css('cursor','pointer');
		setShadow($(this),'0px 0px 1px 1px #7c7c7c');
		if($(this).hasClass('i-update'))
			$(this).attr('title','Cập nhật nội dung này ['+$(this).attr('link')+']');
		else 
			$(this).attr('title','Xóa nội dung này ['+$(this).attr('link')+']');
		$('[title]',this).attr('title','');
		$(this).attr('onclick','').unbind('click');
	});
	$('.i-update,.i-delete').click(function(event){
		if($(this).hasClass('i-delete'))
		{
			if(!confirm('Bạn có đồng ý xóa không?'))
				return false;
			else
				window.location='index.php?'+$(this).attr('link');
		}
		else		
			window.open('popup.php?'+$(this).attr('link'));
		return false;
	})
	$('.i-update,.i-delete').mouseenter(function(event){
		setShadow($(this),'0px 0px 3px 3px #3399ff');
	})
	$('.i-update,.i-delete').mouseleave(function(event){
		setShadow($(this),'0px 0px 1px 1px #7c7c7c');
	})
	<?php }?>
})

<?php if($login==1 && $mode=='edit'){?>
function setShadow(object,shadow)
{
	object.css('-moz-box-shadow',shadow);
	object.css('-webkit-box-shadow',shadow);	
	object.css('box-shadow',shadow);
}
<?php }?>
</script>

</head>
<body id='body' <?php echo $login==1?" style='margin-top:36px' ":""?>>

<?php require_once 'ext/php/page/_toolbar.php'?>

<div id="outer-wrapper"><div id="top_bg"><div id="bottom_bg"><div id="wrap2"><div id="wrap3"><div id="wrap4"><div id="wrap5">

<!-- (Header-wrapper Start) -->
<div id="header-wrapper">
<div class="header section" id="header"><div class="widget Header" id="Header1">
<div id="header-inner">
<div class="titlewrapper">
<h1 class="title" id="blog_title" >
	<div class="i-update" link='page=_update-by-name&name=title' style='cursor:pointer' onclick="window.location='index.php'">
		<?php echo Page::fetch_page_content_by_name('title');?>
	</div>
</h1>
</div>
<div class="descriptionwrapper">
<h2>
	<div class="i-update" link='page=_update-by-name&name=m_contact_2'>
		<?php echo Page::fetch_page_content_by_name("m_contact_2");?>
	</div>
</h2>
</div>
</div>
</div></div>
<div class="header-tabs section" id="header-tabs"><div class="widget LinkList" id="LinkList64">
<div class="widget-content">
<?php require_once 'ext/php/page/_menu.php';?>
</div>
</div></div>
<div id="rss"><img alt="RSS" src="a_data/spacer.gif"></div>
</div>
<!-- (Header-wrapper End) -->
<!-- (Content-wrapper Start) -->
<div class="clearfix" id="content-wrapper">
<div id="crosscol-wrapper" style="text-align:center">
<div class="crosscol section" id="crosscol"></div>
</div>
<!-- (Sidebar-wrapper Start) -->
<div class="clearfix" id="sidebar-wrapper">

<?php require_once 'ext/php/page/_search.php';?>

<?php require_once 'ext/php/page/_welcome.php';?>

<div class="clearfix" id="sidebar_main">
<ul><li>
<div class="section" id="sidebar-main">

<?php require_once 'ext/php/page/_contact.php';?>

<?php require_once 'ext/php/page/_focus.php';?>

<?php require_once 'ext/php/page/_map.php';?>

<?php require_once 'ext/php/page/_histats.php';?>

<?php require_once 'ext/php/page/_chat.php';?>


</div>
</li></ul>
</div>
</div>
<!-- (Sidebar-wrapper End) -->
<!-- (Main-wrapper Start) -->
<div class="clearfix" id="main-wrapper">
<!-- Main Start -->
<div class="main section" id="main">
<div class="widget Blog" id="Blog1">
<div class="blog-posts hfeed" >
	<?php
	if(Common::check_auth())
	{
		$path="ext/php/page/$page.php";
		if(file_exists($path))
			require_once $path;
		else 
		{
			if(isset($_GET['group_id']) && ($_GET['group_id']==3 || $_GET['group_id']==4))
				require_once "ext/php/page/_detail-news.php";
			else
				require_once "ext/php/page/_detail.php";
		}
	}
	?>
</div>
</div></div>
</div>
<!-- (Main-wrapper End) -->
<div style="clear: both;"></div>
</div>
<!-- (Content-wrapper End) -->
<div style="clear: both;"></div>
<!-- (Footer-wrapper) -->
<div id="footer-wrapper">
<div class="credit">
	Copyright  2012 <?php echo Page::fetch_page_content_by_name('title');?>.</a>
	<br/>Designed by mGroup.
</div>
</div>
<!-- (Footer-wrapper End) -->
<div style="clear: both;"></div>
</div></div></div></div></div></div></div>

<script src="http://www.google.com/jsapi" type="text/javascript"></script>
<script type="text/javascript"> 
  google.load('search', '1', {language : 'en'});
  google.setOnLoadCallback(function() {
	var customSearchOptions = {};  var customSearchControl = new google.search.CustomSearchControl(
	  '014736274604518038371:fmxsf69_1ma', customSearchOptions);
	customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);
	var options = new google.search.DrawOptions();
	options.enableSearchboxOnly("<?php echo BASE_URL?>index.php?page=tim-kiem");
	customSearchControl.draw('cse-search-form', options);
  }, true);
</script>

<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-22625184-4']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>

</body></html>



